﻿/*
 * EmeCoder v1.2.1.168
 * 作者：Administrator/JOC-PC
 * 时间：2013-12-19 20:53:23
 * 版权：版权所有 (C) Eme Development Team 2013
*/

﻿using System;
using System.ComponentModel;
using HmFramework.Data;
using HmFramework.Data.Configuration;
using HmFramework.Data.DataAccessLayer;

namespace CuteSprite.Eme.Data.Settlement
{
	/// <summary>结算记录</summary>
	[Serializable]
	[DataObject]
	[Description("结算记录")]
	[BindIndex("IX_Settlement_ExpressNo", true, "BusinessCategory,ExpressNo")]
	[BindIndex("IX_Settlement_Customer", false, "CustomerID,SettlementDate")]
	[BindIndex("IX_Settlement_Organize", false, "OrganizeID,SettlementDate")]
	[BindIndex("IX_Settlement_SettlementDate", false, "SettlementDate")]
	[BindIndex("PK__SettlementID__4374AA593987AC8E", true, "ID")]
	[BindTable("Settlement", Description = "结算记录", ConnName = "EmeSettlement", DbType = DatabaseType.SqlServer)]
	public abstract partial class Settlement<TEntity> : ISettlement
	{
		#region 属性

		private Int32 _ID;

		/// <summary>主键</summary>
		[DisplayName("主键")]
		[Description("主键")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "主键", null, "int", 10, 0, false)]
		public virtual Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } }
		}

		private Int32 _OrganizeID;

		/// <summary>所属部门</summary>
		[DisplayName("所属部门")]
		[Description("所属部门")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "OrganizeID", "所属部门", null, "int", 10, 0, false)]
		public virtual Int32 OrganizeID
		{
			get { return _OrganizeID; }
			set { if (OnPropertyChanging(__.OrganizeID, value)) { _OrganizeID = value; OnPropertyChanged(__.OrganizeID); } }
		}

		private Int32 _CustomerID;

		/// <summary>所属客户</summary>
		[DisplayName("所属客户")]
		[Description("所属客户")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "CustomerID", "所属客户", null, "int", 10, 0, false)]
		public virtual Int32 CustomerID
		{
			get { return _CustomerID; }
			set { if (OnPropertyChanging(__.CustomerID, value)) { _CustomerID = value; OnPropertyChanged(__.CustomerID); } }
		}

		private DateTime _SettlementDate;

		/// <summary>结算日期</summary>
		[DisplayName("结算日期")]
		[Description("结算日期")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(4, "SettlementDate", "结算日期", null, "datetime", 3, 0, false)]
		public virtual DateTime SettlementDate
		{
			get { return _SettlementDate; }
			set { if (OnPropertyChanging(__.SettlementDate, value)) { _SettlementDate = value; OnPropertyChanged(__.SettlementDate); } }
		}

		private SByte _CustomerDiscount;

		/// <summary>客户折扣</summary>
		[DisplayName("客户折扣")]
		[Description("客户折扣")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(5, "CustomerDiscount", "客户折扣", null, "tinyint", 3, 0, false)]
		public virtual SByte CustomerDiscount
		{
			get { return _CustomerDiscount; }
			set { if (OnPropertyChanging(__.CustomerDiscount, value)) { _CustomerDiscount = value; OnPropertyChanged(__.CustomerDiscount); } }
		}

		private SByte _DepartmentDiscount;

		/// <summary>部门折扣</summary>
		[DisplayName("部门折扣")]
		[Description("部门折扣")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(6, "DepartmentDiscount", "部门折扣", null, "tinyint", 3, 0, false)]
		public virtual SByte DepartmentDiscount
		{
			get { return _DepartmentDiscount; }
			set { if (OnPropertyChanging(__.DepartmentDiscount, value)) { _DepartmentDiscount = value; OnPropertyChanged(__.DepartmentDiscount); } }
		}

		private SByte _CompanyDiscount;

		/// <summary>公司折扣</summary>
		[DisplayName("公司折扣")]
		[Description("公司折扣")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(7, "CompanyDiscount", "公司折扣", null, "tinyint", 3, 0, false)]
		public virtual SByte CompanyDiscount
		{
			get { return _CompanyDiscount; }
			set { if (OnPropertyChanging(__.CompanyDiscount, value)) { _CompanyDiscount = value; OnPropertyChanged(__.CompanyDiscount); } }
		}

		private Int32 _BusinessCategory;

		/// <summary>业务类别</summary>
		[DisplayName("业务类别")]
		[Description("业务类别")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(8, "BusinessCategory", "业务类别", null, "int", 10, 0, false)]
		public virtual Int32 BusinessCategory
		{
			get { return _BusinessCategory; }
			set { if (OnPropertyChanging(__.BusinessCategory, value)) { _BusinessCategory = value; OnPropertyChanged(__.BusinessCategory); } }
		}

		private String _ExpressNo;

		/// <summary>运单号</summary>
		[DisplayName("运单号")]
		[Description("运单号")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(9, "ExpressNo", "运单号", null, "nvarchar(20)", 0, 0, true)]
		public virtual String ExpressNo
		{
			get { return _ExpressNo; }
			set { if (OnPropertyChanging(__.ExpressNo, value)) { _ExpressNo = value; OnPropertyChanged(__.ExpressNo); } }
		}

		private Int32 _GoodsCategory;

		/// <summary>货物类别</summary>
		[DisplayName("货物类别")]
		[Description("货物类别")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(10, "GoodsCategory", "货物类别", null, "int", 10, 0, false)]
		public virtual Int32 GoodsCategory
		{
			get { return _GoodsCategory; }
			set { if (OnPropertyChanging(__.GoodsCategory, value)) { _GoodsCategory = value; OnPropertyChanged(__.GoodsCategory); } }
		}

		private Int32 _SettlementSolutionID;

		/// <summary>公布价方案</summary>
		[DisplayName("公布价方案")]
		[Description("公布价方案")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(11, "SettlementSolutionID", "公布价方案", null, "int", 10, 0, false)]
		public virtual Int32 SettlementSolutionID
		{
			get { return _SettlementSolutionID; }
			set { if (OnPropertyChanging(__.SettlementSolutionID, value)) { _SettlementSolutionID = value; OnPropertyChanged(__.SettlementSolutionID); } }
		}

		private Int32 _FuelModel;

		/// <summary>燃油计费模式</summary>
		[DisplayName("燃油计费模式")]
		[Description("燃油计费模式")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(12, "FuelModel", "燃油计费模式", null, "int", 10, 0, false)]
		public virtual Int32 FuelModel
		{
			get { return _FuelModel; }
			set { if (OnPropertyChanging(__.FuelModel, value)) { _FuelModel = value; OnPropertyChanged(__.FuelModel); } }
		}

		private Decimal _FuelData;

		/// <summary>燃油计费数值</summary>
		[DisplayName("燃油计费数值")]
		[Description("燃油计费数值")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(13, "FuelData", "燃油计费数值", null, "money", 19, 4, false)]
		public virtual Decimal FuelData
		{
			get { return _FuelData; }
			set { if (OnPropertyChanging(__.FuelData, value)) { _FuelData = value; OnPropertyChanged(__.FuelData); } }
		}

		private Decimal _CustomerPrice;

		/// <summary>客户实收金额</summary>
		[DisplayName("客户实收金额")]
		[Description("客户实收金额")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(14, "CustomerPrice", "客户实收金额", null, "money", 19, 4, false)]
		public virtual Decimal CustomerPrice
		{
			get { return _CustomerPrice; }
			set { if (OnPropertyChanging(__.CustomerPrice, value)) { _CustomerPrice = value; OnPropertyChanged(__.CustomerPrice); } }
		}

		private String _Description;

		/// <summary>描述</summary>
		[DisplayName("描述")]
		[Description("描述")]
		[DataObjectField(false, false, true, 400)]
		[BindColumn(15, "Description", "描述", null, "nvarchar(400)", 0, 0, true)]
		public virtual String Description
		{
			get { return _Description; }
			set { if (OnPropertyChanging(__.Description, value)) { _Description = value; OnPropertyChanged(__.Description); } }
		}

		private Decimal _DepartmentPrice;

		/// <summary>部门上交金额</summary>
		[DisplayName("部门上交金额")]
		[Description("部门上交金额")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(16, "DepartmentPrice", "部门上交金额", null, "money", 19, 4, false)]
		public virtual Decimal DepartmentPrice
		{
			get { return _DepartmentPrice; }
			set { if (OnPropertyChanging(__.DepartmentPrice, value)) { _DepartmentPrice = value; OnPropertyChanged(__.DepartmentPrice); } }
		}

		private String _CustomerAccount;

		/// <summary>客户账号</summary>
		[DisplayName("客户账号")]
		[Description("客户账号")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(17, "CustomerAccount", "客户账号", null, "nvarchar(50)", 0, 0, true)]
		public virtual String CustomerAccount
		{
			get { return _CustomerAccount; }
			set { if (OnPropertyChanging(__.CustomerAccount, value)) { _CustomerAccount = value; OnPropertyChanged(__.CustomerAccount); } }
		}

		private Decimal _CompanyPrice;

		/// <summary>公司上交金额</summary>
		[DisplayName("公司上交金额")]
		[Description("公司上交金额")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(18, "CompanyPrice", "公司上交金额", null, "money", 19, 4, false)]
		public virtual Decimal CompanyPrice
		{
			get { return _CompanyPrice; }
			set { if (OnPropertyChanging(__.CompanyPrice, value)) { _CompanyPrice = value; OnPropertyChanged(__.CompanyPrice); } }
		}

		private Decimal _CustomsDeclarationCost;

		/// <summary>报关费用</summary>
		[DisplayName("报关费用")]
		[Description("报关费用")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(19, "CustomsDeclarationCost", "报关费用", null, "money", 19, 4, false)]
		public virtual Decimal CustomsDeclarationCost
		{
			get { return _CustomsDeclarationCost; }
			set { if (OnPropertyChanging(__.CustomsDeclarationCost, value)) { _CustomsDeclarationCost = value; OnPropertyChanged(__.CustomsDeclarationCost); } }
		}

		private Decimal _FareCustomsHK;

		/// <summary>过关港车费用</summary>
		[DisplayName("过关港车费用")]
		[Description("过关港车费用")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(20, "FareCustomsHK", "过关港车费用", null, "money", 19, 4, false)]
		public virtual Decimal FareCustomsHK
		{
			get { return _FareCustomsHK; }
			set { if (OnPropertyChanging(__.FareCustomsHK, value)) { _FareCustomsHK = value; OnPropertyChanged(__.FareCustomsHK); } }
		}

		private Decimal _WarehousingTemporary;

		/// <summary>临时仓储服务费用</summary>
		[DisplayName("临时仓储服务费用")]
		[Description("临时仓储服务费用")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(21, "WarehousingTemporary", "临时仓储服务费用", null, "money", 19, 4, false)]
		public virtual Decimal WarehousingTemporary
		{
			get { return _WarehousingTemporary; }
			set { if (OnPropertyChanging(__.WarehousingTemporary, value)) { _WarehousingTemporary = value; OnPropertyChanged(__.WarehousingTemporary); } }
		}

		private Decimal _OtherCost;

		/// <summary>其它费用</summary>
		[DisplayName("其它费用")]
		[Description("其它费用")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(22, "OtherCost", "其它费用", null, "money", 19, 4, false)]
		public virtual Decimal OtherCost
		{
			get { return _OtherCost; }
			set { if (OnPropertyChanging(__.OtherCost, value)) { _OtherCost = value; OnPropertyChanged(__.OtherCost); } }
		}

		private Decimal _Price;

		/// <summary>价格</summary>
		[DisplayName("价格")]
		[Description("价格")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(23, "Price", "价格", null, "money", 19, 4, false)]
		public virtual Decimal Price
		{
			get { return _Price; }
			set { if (OnPropertyChanging(__.Price, value)) { _Price = value; OnPropertyChanged(__.Price); } }
		}

		private Decimal _CustomerWeight;

		/// <summary>客户重量</summary>
		[DisplayName("客户重量")]
		[Description("客户重量")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(24, "CustomerWeight", "客户重量", null, "money", 19, 4, false)]
		public virtual Decimal CustomerWeight
		{
			get { return _CustomerWeight; }
			set { if (OnPropertyChanging(__.CustomerWeight, value)) { _CustomerWeight = value; OnPropertyChanged(__.CustomerWeight); } }
		}

		private Decimal _DepartmentWeight;

		/// <summary>部门重量</summary>
		[DisplayName("部门重量")]
		[Description("部门重量")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(25, "DepartmentWeight", "部门重量", null, "money", 19, 4, false)]
		public virtual Decimal DepartmentWeight
		{
			get { return _DepartmentWeight; }
			set { if (OnPropertyChanging(__.DepartmentWeight, value)) { _DepartmentWeight = value; OnPropertyChanged(__.DepartmentWeight); } }
		}

		private Decimal _SettleWeight;

		/// <summary>结算重量</summary>
		[DisplayName("结算重量")]
		[Description("结算重量")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(26, "SettleWeight", "结算重量", null, "money", 19, 4, false)]
		public virtual Decimal SettleWeight
		{
			get { return _SettleWeight; }
			set { if (OnPropertyChanging(__.SettleWeight, value)) { _SettleWeight = value; OnPropertyChanged(__.SettleWeight); } }
		}

		private Decimal _ProtoCustomerWeight;

		/// <summary>原始客户重量</summary>
		[DisplayName("原始客户重量")]
		[Description("原始客户重量")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(27, "ProtoCustomerWeight", "原始客户重量", null, "money", 19, 4, false)]
		public virtual Decimal ProtoCustomerWeight
		{
			get { return _ProtoCustomerWeight; }
			set { if (OnPropertyChanging(__.ProtoCustomerWeight, value)) { _ProtoCustomerWeight = value; OnPropertyChanged(__.ProtoCustomerWeight); } }
		}

		private Decimal _ProtoDepartmentWeight;

		/// <summary>原始部门重量</summary>
		[DisplayName("原始部门重量")]
		[Description("原始部门重量")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(28, "ProtoDepartmentWeight", "原始部门重量", null, "money", 19, 4, false)]
		public virtual Decimal ProtoDepartmentWeight
		{
			get { return _ProtoDepartmentWeight; }
			set { if (OnPropertyChanging(__.ProtoDepartmentWeight, value)) { _ProtoDepartmentWeight = value; OnPropertyChanged(__.ProtoDepartmentWeight); } }
		}

		private Decimal _ProtoSettleWeight;

		/// <summary>原始结算重量</summary>
		[DisplayName("原始结算重量")]
		[Description("原始结算重量")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(29, "ProtoSettleWeight", "原始结算重量", null, "money", 19, 4, false)]
		public virtual Decimal ProtoSettleWeight
		{
			get { return _ProtoSettleWeight; }
			set { if (OnPropertyChanging(__.ProtoSettleWeight, value)) { _ProtoSettleWeight = value; OnPropertyChanged(__.ProtoSettleWeight); } }
		}

		private String _Region;

		/// <summary>地区</summary>
		[DisplayName("地区")]
		[Description("地区")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(30, "Region", "地区", null, "nvarchar(50)", 0, 0, true)]
		public virtual String Region
		{
			get { return _Region; }
			set { if (OnPropertyChanging(__.Region, value)) { _Region = value; OnPropertyChanged(__.Region); } }
		}

		private String _ExpressRecipientPerson;

		/// <summary>揽件人员</summary>
		[DisplayName("揽件人员")]
		[Description("揽件人员")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(31, "ExpressRecipientPerson", "揽件人员", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ExpressRecipientPerson
		{
			get { return _ExpressRecipientPerson; }
			set { if (OnPropertyChanging(__.ExpressRecipientPerson, value)) { _ExpressRecipientPerson = value; OnPropertyChanged(__.ExpressRecipientPerson); } }
		}

		private String _ExpressDepartment;

		/// <summary>揽件部门</summary>
		[DisplayName("揽件部门")]
		[Description("揽件部门")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(32, "ExpressDepartment", "揽件部门", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ExpressDepartment
		{
			get { return _ExpressDepartment; }
			set { if (OnPropertyChanging(__.ExpressDepartment, value)) { _ExpressDepartment = value; OnPropertyChanged(__.ExpressDepartment); } }
		}

		private String _ExpressSendPerson;

		/// <summary>派件人员</summary>
		[DisplayName("派件人员")]
		[Description("派件人员")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(33, "ExpressSendPerson", "派件人员", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ExpressSendPerson
		{
			get { return _ExpressSendPerson; }
			set { if (OnPropertyChanging(__.ExpressSendPerson, value)) { _ExpressSendPerson = value; OnPropertyChanged(__.ExpressSendPerson); } }
		}

		private String _ExpressSendDepartment;

		/// <summary>派件部门</summary>
		[DisplayName("派件部门")]
		[Description("派件部门")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(34, "ExpressSendDepartment", "派件部门", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ExpressSendDepartment
		{
			get { return _ExpressSendDepartment; }
			set { if (OnPropertyChanging(__.ExpressSendDepartment, value)) { _ExpressSendDepartment = value; OnPropertyChanged(__.ExpressSendDepartment); } }
		}

		private Boolean _IsDelete;

		/// <summary>逻辑删除</summary>
		[DisplayName("逻辑删除")]
		[Description("逻辑删除")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(35, "IsDelete", "逻辑删除", null, "bit", 0, 0, false)]
		public virtual Boolean IsDelete
		{
			get { return _IsDelete; }
			set { if (OnPropertyChanging(__.IsDelete, value)) { _IsDelete = value; OnPropertyChanged(__.IsDelete); } }
		}

		private DateTime _ModifiedOn;

		/// <summary>修改时间</summary>
		[DisplayName("修改时间")]
		[Description("修改时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(36, "ModifiedOn", "修改时间", null, "datetime", 3, 0, false)]
		public virtual DateTime ModifiedOn
		{
			get { return _ModifiedOn; }
			set { if (OnPropertyChanging(__.ModifiedOn, value)) { _ModifiedOn = value; OnPropertyChanged(__.ModifiedOn); } }
		}

		private Int32 _ModifiedUserID;

		/// <summary>修改用户ID</summary>
		[DisplayName("修改用户ID")]
		[Description("修改用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(37, "ModifiedUserID", "修改用户ID", null, "int", 10, 0, false)]
		public virtual Int32 ModifiedUserID
		{
			get { return _ModifiedUserID; }
			set { if (OnPropertyChanging(__.ModifiedUserID, value)) { _ModifiedUserID = value; OnPropertyChanged(__.ModifiedUserID); } }
		}

		private String _ModifiedBy;

		/// <summary>修改用户</summary>
		[DisplayName("修改用户")]
		[Description("修改用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(38, "ModifiedBy", "修改用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ModifiedBy
		{
			get { return _ModifiedBy; }
			set { if (OnPropertyChanging(__.ModifiedBy, value)) { _ModifiedBy = value; OnPropertyChanged(__.ModifiedBy); } }
		}

		private DateTime _CreateOn;

		/// <summary>创建时间</summary>
		[DisplayName("创建时间")]
		[Description("创建时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(39, "CreateOn", "创建时间", null, "datetime", 3, 0, false)]
		public virtual DateTime CreateOn
		{
			get { return _CreateOn; }
			set { if (OnPropertyChanging(__.CreateOn, value)) { _CreateOn = value; OnPropertyChanged(__.CreateOn); } }
		}

		private Int32 _CreateUserID;

		/// <summary>创建用户ID</summary>
		[DisplayName("创建用户ID")]
		[Description("创建用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(40, "CreateUserID", "创建用户ID", null, "int", 10, 0, false)]
		public virtual Int32 CreateUserID
		{
			get { return _CreateUserID; }
			set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } }
		}

		private String _CreateBy;

		/// <summary>创建用户</summary>
		[DisplayName("创建用户")]
		[Description("创建用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(41, "CreateBy", "创建用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String CreateBy
		{
			get { return _CreateBy; }
			set { if (OnPropertyChanging(__.CreateBy, value)) { _CreateBy = value; OnPropertyChanged(__.CreateBy); } }
		}

		private Int32 _SettlementState;

		/// <summary>结算状态</summary>
		[DisplayName("结算状态")]
		[Description("结算状态")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(42, "SettlementState", "结算状态", null, "int", 10, 0, false)]
		public virtual Int32 SettlementState
		{
			get { return _SettlementState; }
			set { if (OnPropertyChanging(__.SettlementState, value)) { _SettlementState = value; OnPropertyChanged(__.SettlementState); } }
		}

		private String _PayType;

		/// <summary>支付方式</summary>
		[DisplayName("支付方式")]
		[Description("支付方式")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(43, "PayType", "支付方式", null, "nvarchar(50)", 0, 0, true)]
		public virtual String PayType
		{
			get { return _PayType; }
			set { if (OnPropertyChanging(__.PayType, value)) { _PayType = value; OnPropertyChanged(__.PayType); } }
		}

		#endregion

		#region 获取/设置 字段值

		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case __.ID: return _ID;
					case __.OrganizeID: return _OrganizeID;
					case __.CustomerID: return _CustomerID;
					case __.SettlementDate: return _SettlementDate;
					case __.CustomerDiscount: return _CustomerDiscount;
					case __.DepartmentDiscount: return _DepartmentDiscount;
					case __.CompanyDiscount: return _CompanyDiscount;
					case __.BusinessCategory: return _BusinessCategory;
					case __.ExpressNo: return _ExpressNo;
					case __.GoodsCategory: return _GoodsCategory;
					case __.SettlementSolutionID: return _SettlementSolutionID;
					case __.FuelModel: return _FuelModel;
					case __.FuelData: return _FuelData;
					case __.CustomerPrice: return _CustomerPrice;
					case __.Description: return _Description;
					case __.DepartmentPrice: return _DepartmentPrice;
					case __.CustomerAccount: return _CustomerAccount;
					case __.CompanyPrice: return _CompanyPrice;
					case __.CustomsDeclarationCost: return _CustomsDeclarationCost;
					case __.FareCustomsHK: return _FareCustomsHK;
					case __.WarehousingTemporary: return _WarehousingTemporary;
					case __.OtherCost: return _OtherCost;
					case __.Price: return _Price;
					case __.CustomerWeight: return _CustomerWeight;
					case __.DepartmentWeight: return _DepartmentWeight;
					case __.SettleWeight: return _SettleWeight;
					case __.ProtoCustomerWeight: return _ProtoCustomerWeight;
					case __.ProtoDepartmentWeight: return _ProtoDepartmentWeight;
					case __.ProtoSettleWeight: return _ProtoSettleWeight;
					case __.Region: return _Region;
					case __.ExpressRecipientPerson: return _ExpressRecipientPerson;
					case __.ExpressDepartment: return _ExpressDepartment;
					case __.ExpressSendPerson: return _ExpressSendPerson;
					case __.ExpressSendDepartment: return _ExpressSendDepartment;
					case __.IsDelete: return _IsDelete;
					case __.ModifiedOn: return _ModifiedOn;
					case __.ModifiedUserID: return _ModifiedUserID;
					case __.ModifiedBy: return _ModifiedBy;
					case __.CreateOn: return _CreateOn;
					case __.CreateUserID: return _CreateUserID;
					case __.CreateBy: return _CreateBy;
					case __.SettlementState: return _SettlementState;
					case __.PayType: return _PayType;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case __.ID: _ID = Convert.ToInt32(value); break;
					case __.OrganizeID: _OrganizeID = Convert.ToInt32(value); break;
					case __.CustomerID: _CustomerID = Convert.ToInt32(value); break;
					case __.SettlementDate: _SettlementDate = Convert.ToDateTime(value); break;
					case __.CustomerDiscount: _CustomerDiscount = Convert.ToSByte(value); break;
					case __.DepartmentDiscount: _DepartmentDiscount = Convert.ToSByte(value); break;
					case __.CompanyDiscount: _CompanyDiscount = Convert.ToSByte(value); break;
					case __.BusinessCategory: _BusinessCategory = Convert.ToInt32(value); break;
					case __.ExpressNo: _ExpressNo = Convert.ToString(value); break;
					case __.GoodsCategory: _GoodsCategory = Convert.ToInt32(value); break;
					case __.SettlementSolutionID: _SettlementSolutionID = Convert.ToInt32(value); break;
					case __.FuelModel: _FuelModel = Convert.ToInt32(value); break;
					case __.FuelData: _FuelData = Convert.ToDecimal(value); break;
					case __.CustomerPrice: _CustomerPrice = Convert.ToDecimal(value); break;
					case __.Description: _Description = Convert.ToString(value); break;
					case __.DepartmentPrice: _DepartmentPrice = Convert.ToDecimal(value); break;
					case __.CustomerAccount: _CustomerAccount = Convert.ToString(value); break;
					case __.CompanyPrice: _CompanyPrice = Convert.ToDecimal(value); break;
					case __.CustomsDeclarationCost: _CustomsDeclarationCost = Convert.ToDecimal(value); break;
					case __.FareCustomsHK: _FareCustomsHK = Convert.ToDecimal(value); break;
					case __.WarehousingTemporary: _WarehousingTemporary = Convert.ToDecimal(value); break;
					case __.OtherCost: _OtherCost = Convert.ToDecimal(value); break;
					case __.Price: _Price = Convert.ToDecimal(value); break;
					case __.CustomerWeight: _CustomerWeight = Convert.ToDecimal(value); break;
					case __.DepartmentWeight: _DepartmentWeight = Convert.ToDecimal(value); break;
					case __.SettleWeight: _SettleWeight = Convert.ToDecimal(value); break;
					case __.ProtoCustomerWeight: _ProtoCustomerWeight = Convert.ToDecimal(value); break;
					case __.ProtoDepartmentWeight: _ProtoDepartmentWeight = Convert.ToDecimal(value); break;
					case __.ProtoSettleWeight: _ProtoSettleWeight = Convert.ToDecimal(value); break;
					case __.Region: _Region = Convert.ToString(value); break;
					case __.ExpressRecipientPerson: _ExpressRecipientPerson = Convert.ToString(value); break;
					case __.ExpressDepartment: _ExpressDepartment = Convert.ToString(value); break;
					case __.ExpressSendPerson: _ExpressSendPerson = Convert.ToString(value); break;
					case __.ExpressSendDepartment: _ExpressSendDepartment = Convert.ToString(value); break;
					case __.IsDelete: _IsDelete = Convert.ToBoolean(value); break;
					case __.ModifiedOn: _ModifiedOn = Convert.ToDateTime(value); break;
					case __.ModifiedUserID: _ModifiedUserID = Convert.ToInt32(value); break;
					case __.ModifiedBy: _ModifiedBy = Convert.ToString(value); break;
					case __.CreateOn: _CreateOn = Convert.ToDateTime(value); break;
					case __.CreateUserID: _CreateUserID = Convert.ToInt32(value); break;
					case __.CreateBy: _CreateBy = Convert.ToString(value); break;
					case __.SettlementState: _SettlementState = Convert.ToInt32(value); break;
					case __.PayType: _PayType = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}

		#endregion

		#region 字段名

		/// <summary>取得结算记录字段信息的快捷方式</summary>
		public partial class _
		{
			///<summary>主键</summary>
			public static readonly Field ID = FindByName(__.ID);

			///<summary>所属部门</summary>
			public static readonly Field OrganizeID = FindByName(__.OrganizeID);

			///<summary>所属客户</summary>
			public static readonly Field CustomerID = FindByName(__.CustomerID);

			///<summary>结算日期</summary>
			public static readonly Field SettlementDate = FindByName(__.SettlementDate);

			///<summary>客户折扣</summary>
			public static readonly Field CustomerDiscount = FindByName(__.CustomerDiscount);

			///<summary>部门折扣</summary>
			public static readonly Field DepartmentDiscount = FindByName(__.DepartmentDiscount);

			///<summary>公司折扣</summary>
			public static readonly Field CompanyDiscount = FindByName(__.CompanyDiscount);

			///<summary>业务类别</summary>
			public static readonly Field BusinessCategory = FindByName(__.BusinessCategory);

			///<summary>运单号</summary>
			public static readonly Field ExpressNo = FindByName(__.ExpressNo);

			///<summary>货物类别</summary>
			public static readonly Field GoodsCategory = FindByName(__.GoodsCategory);

			///<summary>公布价方案</summary>
			public static readonly Field SettlementSolutionID = FindByName(__.SettlementSolutionID);

			///<summary>燃油计费模式</summary>
			public static readonly Field FuelModel = FindByName(__.FuelModel);

			///<summary>燃油计费数值</summary>
			public static readonly Field FuelData = FindByName(__.FuelData);

			///<summary>客户实收金额</summary>
			public static readonly Field CustomerPrice = FindByName(__.CustomerPrice);

			///<summary>描述</summary>
			public static readonly Field Description = FindByName(__.Description);

			///<summary>部门上交金额</summary>
			public static readonly Field DepartmentPrice = FindByName(__.DepartmentPrice);

			///<summary>客户账号</summary>
			public static readonly Field CustomerAccount = FindByName(__.CustomerAccount);

			///<summary>公司上交金额</summary>
			public static readonly Field CompanyPrice = FindByName(__.CompanyPrice);

			///<summary>报关费用</summary>
			public static readonly Field CustomsDeclarationCost = FindByName(__.CustomsDeclarationCost);

			///<summary>过关港车费用</summary>
			public static readonly Field FareCustomsHK = FindByName(__.FareCustomsHK);

			///<summary>临时仓储服务费用</summary>
			public static readonly Field WarehousingTemporary = FindByName(__.WarehousingTemporary);

			///<summary>其它费用</summary>
			public static readonly Field OtherCost = FindByName(__.OtherCost);

			///<summary>价格</summary>
			public static readonly Field Price = FindByName(__.Price);

			///<summary>客户重量</summary>
			public static readonly Field CustomerWeight = FindByName(__.CustomerWeight);

			///<summary>部门重量</summary>
			public static readonly Field DepartmentWeight = FindByName(__.DepartmentWeight);

			///<summary>结算重量</summary>
			public static readonly Field SettleWeight = FindByName(__.SettleWeight);

			///<summary>原始客户重量</summary>
			public static readonly Field ProtoCustomerWeight = FindByName(__.ProtoCustomerWeight);

			///<summary>原始部门重量</summary>
			public static readonly Field ProtoDepartmentWeight = FindByName(__.ProtoDepartmentWeight);

			///<summary>原始结算重量</summary>
			public static readonly Field ProtoSettleWeight = FindByName(__.ProtoSettleWeight);

			///<summary>地区</summary>
			public static readonly Field Region = FindByName(__.Region);

			///<summary>揽件人员</summary>
			public static readonly Field ExpressRecipientPerson = FindByName(__.ExpressRecipientPerson);

			///<summary>揽件部门</summary>
			public static readonly Field ExpressDepartment = FindByName(__.ExpressDepartment);

			///<summary>派件人员</summary>
			public static readonly Field ExpressSendPerson = FindByName(__.ExpressSendPerson);

			///<summary>派件部门</summary>
			public static readonly Field ExpressSendDepartment = FindByName(__.ExpressSendDepartment);

			///<summary>逻辑删除</summary>
			public static readonly Field IsDelete = FindByName(__.IsDelete);

			///<summary>修改时间</summary>
			public static readonly Field ModifiedOn = FindByName(__.ModifiedOn);

			///<summary>修改用户ID</summary>
			public static readonly Field ModifiedUserID = FindByName(__.ModifiedUserID);

			///<summary>修改用户</summary>
			public static readonly Field ModifiedBy = FindByName(__.ModifiedBy);

			///<summary>创建时间</summary>
			public static readonly Field CreateOn = FindByName(__.CreateOn);

			///<summary>创建用户ID</summary>
			public static readonly Field CreateUserID = FindByName(__.CreateUserID);

			///<summary>创建用户</summary>
			public static readonly Field CreateBy = FindByName(__.CreateBy);

			///<summary>结算状态</summary>
			public static readonly Field SettlementState = FindByName(__.SettlementState);

			///<summary>支付方式</summary>
			public static readonly Field PayType = FindByName(__.PayType);

			private static Field FindByName(String name)
			{
				return Meta.Table.FindByName(name);
			}
		}

		/// <summary>取得结算记录字段名称的快捷方式</summary>
		public partial class __
		{
			///<summary>主键</summary>
			public const String ID = "ID";

			///<summary>所属部门</summary>
			public const String OrganizeID = "OrganizeID";

			///<summary>所属客户</summary>
			public const String CustomerID = "CustomerID";

			///<summary>结算日期</summary>
			public const String SettlementDate = "SettlementDate";

			///<summary>客户折扣</summary>
			public const String CustomerDiscount = "CustomerDiscount";

			///<summary>部门折扣</summary>
			public const String DepartmentDiscount = "DepartmentDiscount";

			///<summary>公司折扣</summary>
			public const String CompanyDiscount = "CompanyDiscount";

			///<summary>业务类别</summary>
			public const String BusinessCategory = "BusinessCategory";

			///<summary>运单号</summary>
			public const String ExpressNo = "ExpressNo";

			///<summary>货物类别</summary>
			public const String GoodsCategory = "GoodsCategory";

			///<summary>公布价方案</summary>
			public const String SettlementSolutionID = "SettlementSolutionID";

			///<summary>燃油计费模式</summary>
			public const String FuelModel = "FuelModel";

			///<summary>燃油计费数值</summary>
			public const String FuelData = "FuelData";

			///<summary>客户实收金额</summary>
			public const String CustomerPrice = "CustomerPrice";

			///<summary>描述</summary>
			public const String Description = "Description";

			///<summary>部门上交金额</summary>
			public const String DepartmentPrice = "DepartmentPrice";

			///<summary>客户账号</summary>
			public const String CustomerAccount = "CustomerAccount";

			///<summary>公司上交金额</summary>
			public const String CompanyPrice = "CompanyPrice";

			///<summary>报关费用</summary>
			public const String CustomsDeclarationCost = "CustomsDeclarationCost";

			///<summary>过关港车费用</summary>
			public const String FareCustomsHK = "FareCustomsHK";

			///<summary>临时仓储服务费用</summary>
			public const String WarehousingTemporary = "WarehousingTemporary";

			///<summary>其它费用</summary>
			public const String OtherCost = "OtherCost";

			///<summary>价格</summary>
			public const String Price = "Price";

			///<summary>客户重量</summary>
			public const String CustomerWeight = "CustomerWeight";

			///<summary>部门重量</summary>
			public const String DepartmentWeight = "DepartmentWeight";

			///<summary>结算重量</summary>
			public const String SettleWeight = "SettleWeight";

			///<summary>原始客户重量</summary>
			public const String ProtoCustomerWeight = "ProtoCustomerWeight";

			///<summary>原始部门重量</summary>
			public const String ProtoDepartmentWeight = "ProtoDepartmentWeight";

			///<summary>原始结算重量</summary>
			public const String ProtoSettleWeight = "ProtoSettleWeight";

			///<summary>地区</summary>
			public const String Region = "Region";

			///<summary>揽件人员</summary>
			public const String ExpressRecipientPerson = "ExpressRecipientPerson";

			///<summary>揽件部门</summary>
			public const String ExpressDepartment = "ExpressDepartment";

			///<summary>派件人员</summary>
			public const String ExpressSendPerson = "ExpressSendPerson";

			///<summary>派件部门</summary>
			public const String ExpressSendDepartment = "ExpressSendDepartment";

			///<summary>逻辑删除</summary>
			public const String IsDelete = "IsDelete";

			///<summary>修改时间</summary>
			public const String ModifiedOn = "ModifiedOn";

			///<summary>修改用户ID</summary>
			public const String ModifiedUserID = "ModifiedUserID";

			///<summary>修改用户</summary>
			public const String ModifiedBy = "ModifiedBy";

			///<summary>创建时间</summary>
			public const String CreateOn = "CreateOn";

			///<summary>创建用户ID</summary>
			public const String CreateUserID = "CreateUserID";

			///<summary>创建用户</summary>
			public const String CreateBy = "CreateBy";

			///<summary>结算状态</summary>
			public const String SettlementState = "SettlementState";

			///<summary>支付方式</summary>
			public const String PayType = "PayType";
		}

		#endregion
	}

	/// <summary>结算记录接口</summary>
	public partial interface ISettlement
	{
		#region 属性

		/// <summary>主键</summary>
		Int32 ID { get; set; }

		/// <summary>所属部门</summary>
		Int32 OrganizeID { get; set; }

		/// <summary>所属客户</summary>
		Int32 CustomerID { get; set; }

		/// <summary>结算日期</summary>
		DateTime SettlementDate { get; set; }

		/// <summary>客户折扣</summary>
		SByte CustomerDiscount { get; set; }

		/// <summary>部门折扣</summary>
		SByte DepartmentDiscount { get; set; }

		/// <summary>公司折扣</summary>
		SByte CompanyDiscount { get; set; }

		/// <summary>业务类别</summary>
		Int32 BusinessCategory { get; set; }

		/// <summary>运单号</summary>
		String ExpressNo { get; set; }

		/// <summary>货物类别</summary>
		Int32 GoodsCategory { get; set; }

		/// <summary>公布价方案</summary>
		Int32 SettlementSolutionID { get; set; }

		/// <summary>燃油计费模式</summary>
		Int32 FuelModel { get; set; }

		/// <summary>燃油计费数值</summary>
		Decimal FuelData { get; set; }

		/// <summary>客户实收金额</summary>
		Decimal CustomerPrice { get; set; }

		/// <summary>描述</summary>
		String Description { get; set; }

		/// <summary>部门上交金额</summary>
		Decimal DepartmentPrice { get; set; }

		/// <summary>客户账号</summary>
		String CustomerAccount { get; set; }

		/// <summary>公司上交金额</summary>
		Decimal CompanyPrice { get; set; }

		/// <summary>报关费用</summary>
		Decimal CustomsDeclarationCost { get; set; }

		/// <summary>过关港车费用</summary>
		Decimal FareCustomsHK { get; set; }

		/// <summary>临时仓储服务费用</summary>
		Decimal WarehousingTemporary { get; set; }

		/// <summary>其它费用</summary>
		Decimal OtherCost { get; set; }

		/// <summary>价格</summary>
		Decimal Price { get; set; }

		/// <summary>客户重量</summary>
		Decimal CustomerWeight { get; set; }

		/// <summary>部门重量</summary>
		Decimal DepartmentWeight { get; set; }

		/// <summary>结算重量</summary>
		Decimal SettleWeight { get; set; }

		/// <summary>原始客户重量</summary>
		Decimal ProtoCustomerWeight { get; set; }

		/// <summary>原始部门重量</summary>
		Decimal ProtoDepartmentWeight { get; set; }

		/// <summary>原始结算重量</summary>
		Decimal ProtoSettleWeight { get; set; }

		/// <summary>地区</summary>
		String Region { get; set; }

		/// <summary>揽件人员</summary>
		String ExpressRecipientPerson { get; set; }

		/// <summary>揽件部门</summary>
		String ExpressDepartment { get; set; }

		/// <summary>派件人员</summary>
		String ExpressSendPerson { get; set; }

		/// <summary>派件部门</summary>
		String ExpressSendDepartment { get; set; }

		/// <summary>逻辑删除</summary>
		Boolean IsDelete { get; set; }

		/// <summary>修改时间</summary>
		DateTime ModifiedOn { get; set; }

		/// <summary>修改用户ID</summary>
		Int32 ModifiedUserID { get; set; }

		/// <summary>修改用户</summary>
		String ModifiedBy { get; set; }

		/// <summary>创建时间</summary>
		DateTime CreateOn { get; set; }

		/// <summary>创建用户ID</summary>
		Int32 CreateUserID { get; set; }

		/// <summary>创建用户</summary>
		String CreateBy { get; set; }

		/// <summary>结算状态</summary>
		Int32 SettlementState { get; set; }

		/// <summary>支付方式</summary>
		String PayType { get; set; }

		#endregion

		#region 获取/设置 字段值

		/// <summary>获取/设置 字段值。</summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		Object this[String name] { get; set; }

		#endregion
	}
}